# -*- coding: utf-8 -*-

from calprofit import *

def coinone_btc_sell(btcnum,benjin , price_info):
    btcnum = Decimal(btcnum)
    result = {}
    sell_price = coinone_btc2usd_sellprice_inqueue(btcnum,price_info)
    benefit = sell_price * btcnum * get_krw2cny() - benjin
    result["coinone_btc_sell_price"] = sell_price
    result["coinone_btc_sell_benefit"] = benefit
    return result


def coinone_eth_sell(ethnum, benjin , price_info):
    btcnum = Decimal(ethnum)
    result = {}
    sell_price = coinone_eth2usd_sellprice_inqueue(btcnum,price_info)
    benefit = sell_price * btcnum * get_krw2cny() - benjin
    result["coinone_btc_sell_price"] = sell_price
    result["coinone_btc_sell_benefit"] = benefit
    return result